package com.carey.myblog.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.carey.myblog.pojo.User;
import com.carey.myblog.service.UserService;
import com.carey.myblog.mapper.UserMapper;
import org.springframework.stereotype.Service;

/**
* @author carey-
* @description 针对表【t_user】的数据库操作Service实现
* @createDate 2022-05-25 22:10:04
*/
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User>
    implements UserService{

    @Override
    public User CheckUser(String username, String password) {
        QueryWrapper<User> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("username",username);
        queryWrapper.eq("password",password);
        User user = baseMapper.selectOne(queryWrapper);
        return user;
    }
}




